Docker override config from env variables#8326
Conversation
This comment has been minimized.
This comment has been minimized.
Documentation of feature from ipfs/kubo#8326
|
Is this necessary given that you can just do |
Most people expect use containers as something fungible (or at least, be able to). Since you can't apply new config without restarting the daemon you must use volumes. I think is very very useful be able start a fresh ipfs container with all desired config with just one cammand and ready to use |
|
We think that #8337 is preferred, but we'll dialog about that there. |
|
This PR was discussed again during GO triage on 2021-09-03, my quick summary:
In short, the decision was to not do this and close this PR without merging, and go with explicit docker hooks proposed in #8337 Thank you for the PoC and pushing the discussion forward @vk496 👍 |
Hello,
It seems a old problem without a clear patch to support it. I've tried to do it as much simple/clean as possible.
With this patch, anyone can override the config with env variable such as:
Take in account that:
IPFSCONFIG_FooBarthanIPFSCONFIG_FOOBARipfs configstuff). Something likeIPFSCONFIG_Swarm_EnableAutoRealy=truewill be accepted and written to the config even if it does nothing. So typos could make you loose a lot of hours here :)Hope it helps you. IPFS is really awesome stuff and now it should be more flexible in container environments
/cc #251 #387 #6325
PS: Docker docs should be updated if is finally merged